package com.yxw.live_vod_backend_boot.dto;



import com.yxw.live_vod_backend_boot.entity.YxLiveAgreementEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
//import lombok.EqualsAndHashCode;



/*** 
*@author Jiaxu.Huang
*@date 2023/12/10 11:46:16
*@update 2023/12/10 11:46:16
**/
@Data
//@EqualsAndHashCode(callSuper = true)
public class YxLiveAgreementDTO   implements Serializable
{
    private static final long serialVersionUID = 81702179976647L;
    /**
    *协议Id
    */
    @NotNull(message = "协议Id不可为空")
    @ApiModelProperty(value = "协议Id")
    private Integer Id;
    /**
    *协议内容
    */
    @NotBlank(message = "协议内容不可为空")
    @ApiModelProperty(value = "协议内容")
    private String agreementContent;
    /**
    *创建人
    */
    @NotBlank(message = "创建人不可为空")
    @ApiModelProperty(value = "创建人")
    private String userId;
    /**
    *状态:1生效,0失效(全表只有一条记录是生效的状态)
    */
    @NotNull(message = "生效状态不可为空")
    @ApiModelProperty(value = "状态:1生效,0失效(全表只有一条记录是生效的状态)")
    private Integer state;
    /**
    *创建时间
    */
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    /**
    *修改时间
    */
    @ApiModelProperty(value = "")
    private java.util.Date updateTime;
    /**
    *将DTO转换为ENTITY
    */
    public YxLiveAgreementEntity ConverToEntity()
    {
        YxLiveAgreementEntity oYxLiveAgreementEntity = new YxLiveAgreementEntity ();
        oYxLiveAgreementEntity.setId(Id) ;
        oYxLiveAgreementEntity.setAgreementContent(agreementContent) ;
        oYxLiveAgreementEntity.setUserId(userId) ;
        oYxLiveAgreementEntity.setState(state) ;
        oYxLiveAgreementEntity.setCreateTime(createTime) ;
        oYxLiveAgreementEntity.setUpdateTime(updateTime) ;
        return oYxLiveAgreementEntity;
    }
}

